package kr.hkit.powerjava.chapter15;

import java.awt.Graphics;

import javax.swing.JPanel;

public class MyPanel extends JPanel {

	/**
	 * Create the panel.
	 */
	private int y;
	public MyPanel() {
	
	}
	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		System.out.println("MyPanel-paintComponent Call");
		//도화지에 그리자(한번만 그리기)
		
		g.drawString("Hello Java", 10, 10);//10,10위치에 문자열
		g.drawLine(10, 20, 110, 20);//수평선
		g.drawRect(10, 30, 100, 100);//사각형
	
	}	
	
}
